/**
 * 
 */
package com.cait.dutyfree.dataaccess;

import java.util.ArrayList;

import com.cait.dutyfree.pojo.LoginDetail;
import com.cait.dutyfree.pojo.LoginUser;
import com.cait.dutyfree.pojo.UserEvent;

/**
 * @author Rasika Kaluwalgoda
 * 
 */
public interface UserServiceDAO {

	// Login User

	public String userAuthentication(String username, String password)
			throws Exception;

	public boolean addUser(LoginUser user) throws Exception;

	public boolean updateUser(LoginUser user) throws Exception;

	public String resetFailLoginAttempts(LoginUser user) throws Exception;

	public ArrayList<LoginUser> getUsers() throws Exception;

	public ArrayList<LoginUser> getLockedUsers() throws Exception;

	public LoginUser getUser(String username) throws Exception;

	public LoginUser getUser(int userID) throws Exception;

	public boolean updateLastLoginDetails(LoginUser user) throws Exception;

	public LoginUser getUserByName(String name) throws Exception;

	public boolean isUserAvailable(String userName) throws Exception;

	// Login Detail

	public String addLoginDetail(LoginDetail detail) throws Exception;

	public ArrayList<LoginDetail> getDetails(LoginUser user) throws Exception;

	public ArrayList<LoginDetail> getDetails(LoginUser user, int pageSize,
			int pageNo) throws Exception;

	// User Events

	public String addUserEvent(UserEvent event) throws Exception;

	public ArrayList<UserEvent> getEvents(LoginUser user) throws Exception;

	public ArrayList<UserEvent> getAllEvents() throws Exception;

}
